<extend name="Public/base"/>

<block name="style">
  <link rel="stylesheet" type="text/css" href="__CSS__/order.css" media="all">
</block>

<block name="body">
  <!-- 标题 -->
  <div class="main-title">
    <h2>
      拼团订单列表({$_total})
    </h2>
  </div>
  <!-- 按钮工具栏 -->
  <div class="cf">
    <div class="fl">
      <a class="btn" href="{:U('Join/orderList',array('id'=>$join_id))}">刷 新</a>
    </div>
    <!-- 高级搜索 -->
    <form action="{:U('Join/orderList',array('id'=>$join_id))}" method="GET" id="J_search_form">
      <div class="search-form fl cf">
        <div class="fl">
          <select name="status">
              <option value="">订单状态</option>
              <option value="0">待拼团</option>
              <option value="1">成功拼团</option>
              <option value="2">失败拼团</option>
              <option value="3">拼团失败且退款</option>
            </select>
        </div>
      </div>
    </form>
  </div>
  <!-- 数据表格 -->
  <table class="order-table-head">
    <tr>
      <th width="30">
         <input class="checkbox check-all" type="checkbox" style="opacity:0">
      </th>
      <th width="650">订单基本信息</th>
      <th class="text-center">开团要求</th>
      <th width="60">参团人数</th>
      <th width="110">状态</th>
      <th width="153">操作</th>
    </tr>
  </table>
  <notempty name="list">
    <volist name="list" key='key' id="vo">
      <table class="order-table">
        <tr>
          <th colspan="8">
            <span class="text-cancel">下单时间：</span>
            {$vo.stime|time_format}
            <span class="split-tab"></span>
            <span class="text-cancel">发起人：</span>
            <a href="{:U('User/view?id='.$vo['reg_uid'])}">{$vo.reg_uid|get_nickname}</a>
            <span class="split-tab"></span>
          </tr>
	      <tr>
	        <td width="20" class="text-center{$data['supplier_ids'] == 0 ? ' is-pai-order' :'' }">
	          <input name="ids[]" class="ids" type="checkbox" value="{$data['id']}" style="opacity:0"> 
	        </td>
	        <td width="130" class="item-lists">
	          <a href="{:U('/Item/detail?id='.$vo['item_id'])}" target="_blank"><img src="{:get_image_thumb(get_cover(get_item_images($vo['item_id']), 'path'), 60, 60)}" title="{$vo['item_id']|get_item_name}"></a>
	        </td>
	        <td width="190">商品编号：{$vo.number}</td>
	        <td width="300" class="text-right"><a href="{:U('/Item/detail?id='.$vo['item_id'])}" target="_blank">{$vo.name}</a></td>
	        <td class="text-center">开团要求：<span class="split-tab">{$vo.num}人以上</span></td>
	        <td width="53" class="text-center">{$vo.id|get_join_count}</td>
	        <td width="93" class="text-center">
	            <switch name='vo.status'>
	              <case value='0'>待拼团</case>
	              <case value='1'>拼团成功</case>
	              <case value='2'>拼单失败,退款处理中</case>
	              <case value='3'>拼团失败且已退款</case>
	            </switch>
	      	</td>
	      	<td width="140" class="text-center"><a href="{:U('joinView?id='.$vo['id'])}">[查看详情]</a>
	         <!-- <a href="{:U('setStatus?status=-1&ids='.$data['id'])}" class="confirm ajax-get">[退款]</a> -->
	        </td>
	      </tr>
      </table>
    </volist>
    <div class="page">
      {$_page}
    </div>
  <else/>
  <div class="list-empty">
    暂无订单！
  </div>
  </notempty>
</block>

<block name="script">
  <script type="text/javascript">
    $(function(){
      //设置单选，复选，下拉菜单的值
      var status = "{:I('get.status')}";
      Core.setValue('status', status);
      //导航高亮
      highlight_subnav("{:U('index')}");
    });
  </script>
</block>